package com.home.jinlanhua.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @program: jinlanhua
 * @description:
 * @author: Mr.Wang
 * @create: 2020-07-06 14:54
 **/
@Data
@AllArgsConstructor// 有参构造函数
@NoArgsConstructor// 无参数构造函数
@ToString// toString方法
@Accessors(chain = true)
@TableName("users")// 表名

public class User implements Serializable {
    @TableId(value = "id",type = IdType.AUTO)
    private String id;
    private String realname;
    @TableField(value = "username")
    private String username;
    private String password;
    private String userAvatar;
    private String email;
    private String phone;
    private Date createdAt;
    private Date updatedAt;
    private Date deletedAt;
    // 不是数据库的列
    @TableField(exist = false)
    private Date aaaa;
}
